<template>
	<view @tap="handleC">
		<picker mode="selector" @change="handleChange" :value="multiIndex" :range="aList" range-key="username">
			<view class="uni-input">{{multiIndex==0?aList[0].username:[multiIndex].username}}</view>
		</picker>
	</view>
</template>
<script>
	import {apiApproverInfo} from '@/common/api.js'
	export default {
		name: "picker-c",
		data() {
			return {
				title: 'picker',
				index: 0,
				multiArray: [
					[],
					[],
					[]
				],
				multiIndex: 0,
				flag:false
			}
		},
		props:{
			aList:Array
		},
		created() {
			const result=this.aList[0]
		},
		methods: {
			handleChange(e){
				const index = e.detail.value
				const result=this.aList[index]
				this.$emit('change',result)
			},
			handleC(){
				setTimeout(()=>{
					this.flag = true
				},100)
			},
			bindDateChange: function(e) {
				this.date = e.target.value
			},
			bindTimeChange: function(e) {
				this.time = e.target.value
			}
			
		}
	}
</script>

<style>

</style>
